//
//  NRWCarChooseCarModelVC.m
//  New_Runway
//
//  Created by NewLife on 2018/3/8.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "NRWCarChooseCarModelVC.h"
#import "CarSeriesModel.h"

@interface NRWCarChooseCarModelVC ()

@end

@implementation NRWCarChooseCarModelVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)cellDidClickWithIndex:(NSIndexPath *)indexPath {
    
    if (indexPath.row == 0) {
        
        if (self.chooseCarModelCompleted) {
            self.chooseCarModelCompleted(nil, @"不限车系");
        }
        
    } else {
        
        seriesResult *seriesInfo = self.seriesArray[indexPath.row - 1];
        
        if (self.chooseCarModelCompleted) {
            self.chooseCarModelCompleted([NSString stringWithFormat:@"%zd",seriesInfo.seriesId], seriesInfo.seriesName);
        }
    }
    [self.navigationController popViewControllerAnimated:YES];
}

@end
